package net.xo68.destiny.starter.common;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Slf4j
@Configuration
@ConfigurationProperties("destiny.timewheel")
public class TimingWheelProperties {

    private boolean enable=true;

    /**
     * 调度线程名称
     */
    private String threadName="timewheel";

    /**
     * 线程数,0时，根据机器cpu核心数自动调节
     */
    private int threadCount=0;

    /**
     *轮子的格子数量
     */
    private long ticksPerWheel=32L;
    /**
     * 轮子每个格了的间隔时间，单位毫秒
     */
    private long tickDuration=1000L;

    /**
     * 即将超时项的最大数量
     */
    private long maxPendingTimeouts;
}
